package com.by.mapper;

import com.by.bean.Dic;
import com.by.query.DicQuery;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * date 2025/2/24 15:25
 * author bjj
 * decoration
 * version 1.0
 * since jdk11
 */
@Mapper
public interface DicMapper {
    /**
     * 根据pid分页查讯
     * @param dicQuery
     * @return
     */
    List<Map> query(DicQuery dicQuery);

    /**
     * 新增字典
     * @param dic
     * @return
     */
    int save(Dic dic);

    /**
     * 更新字典
     * @param dic
     * @return
     */
    int update(Dic dic);

    /**
     * 根据id删除字典
     * @param id
     * @return
     */
    int delete(int id);

    /**
     * 根据pid查询所有字典
     * @return
     */
    List<Map> queryById(int pid);
}
